package com.example.gongj;

import java.io.FileWriter;
import java.io.IOException;

/**
 * 续写和换行
 *
 */
public class FileWriterDemo3 {
    public static void main(String[] args) throws IOException {
        FileWriter fr = new FileWriter("IO流//d.txt",true);
        for (int i = 0; i < 4; i++) {
            fr.write("追加写");
            fr.write("\r\n");
        }
        fr.flush();
        fr.close();

    }
}
